SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


alter   trigger tt_tradersetacc_au on tt_tradersetacc for update as
begin
  set nocount on

  update tt_tradersetacc set bscamt=i.bbalance-i.bsuramt, escamt=i.ebalance-i.esuramt
    ,dcbscamt=i.dcbbalance-i.dcbsuramt, dcescamt=i.dcebalance-i.dcesuramt
    from tt_tradersetacc t,inserted i
    where t.traderid=i.traderid and t.accyear=i.accyear and t.accmonth=i.accmonth and t.moneyid=i.moneyid



end



GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

